package com.share.pattern;

import java.util.Scanner;

/**
 * 计算器 工厂 类
 * 
 */

public class OperationFactory {

	/**
	 * v0.4 工厂操作类
	 * 
	 * 多态 实例化
	 */
	public static Operation creatOperate(String strOpt) {

		Operation oper = null;

		switch (strOpt) {
		case "+":
			oper = new OperationPlus();
			break;
		case "-":
			oper = new OperationSub();
			break;
		case "*":
			break;
		case "/":
			break;
		}

		return oper;
	}

}
